package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the medical_notice_px database table.
 * 
 */
@Entity
@Table(name="medical_notice_px")
@NamedQuery(name="MedicalNoticePx.findAll", query="SELECT m FROM MedicalNoticePx m")
public class MedicalNoticePx implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="medical_notice_id")
	private int medicalNoticeId;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="medical_notice_date")
	private Date medicalNoticeDate;

	@Column(name="medical_notice_state")
	private int medicalNoticeState;
	
	@Column(name="medical_notice_zje")
	private BigDecimal medicalNoticeZje;

	private String tjys;

	//bi-directional many-to-one association to RegisteredPx
	@ManyToOne
	@JoinColumn(name="outpatient_id")
	private RegisteredPx registeredPx;

	//bi-directional many-to-one association to MedicalNoticexqPx
	@OneToMany(mappedBy="medicalNoticePx")
	private List<MedicalNoticexqPx> medicalNoticexqPxs;

//	//bi-directional many-to-one association to TjsfjlbTbPx
//	@OneToMany(mappedBy="medicalNoticePx")
//	private List<TjsfjlbTbPx> tjsfjlbTbPxs;

	public MedicalNoticePx() {
	}
	
	
	public BigDecimal getMedicalNoticeZje() {
		return medicalNoticeZje;
	}


	public void setMedicalNoticeZje(BigDecimal medicalNoticeZje) {
		this.medicalNoticeZje = medicalNoticeZje;
	}


	public int getMedicalNoticeId() {
		return this.medicalNoticeId;
	}

	public void setMedicalNoticeId(int medicalNoticeId) {
		this.medicalNoticeId = medicalNoticeId;
	}

	public Date getMedicalNoticeDate() {
		return this.medicalNoticeDate;
	}

	public void setMedicalNoticeDate(Date medicalNoticeDate) {
		this.medicalNoticeDate = medicalNoticeDate;
	}

	public int getMedicalNoticeState() {
		return this.medicalNoticeState;
	}

	public void setMedicalNoticeState(int medicalNoticeState) {
		this.medicalNoticeState = medicalNoticeState;
	}

	public String getTjys() {
		return this.tjys;
	}

	public void setTjys(String tjys) {
		this.tjys = tjys;
	}

	public RegisteredPx getRegisteredPx() {
		return this.registeredPx;
	}

	public void setRegisteredPx(RegisteredPx registeredPx) {
		this.registeredPx = registeredPx;
	}

	public List<MedicalNoticexqPx> getMedicalNoticexqPxs() {
		return this.medicalNoticexqPxs;
	}

	public void setMedicalNoticexqPxs(List<MedicalNoticexqPx> medicalNoticexqPxs) {
		this.medicalNoticexqPxs = medicalNoticexqPxs;
	}

	public MedicalNoticexqPx addMedicalNoticexqPx(MedicalNoticexqPx medicalNoticexqPx) {
		getMedicalNoticexqPxs().add(medicalNoticexqPx);
		medicalNoticexqPx.setMedicalNoticePx(this);

		return medicalNoticexqPx;
	}

	public MedicalNoticexqPx removeMedicalNoticexqPx(MedicalNoticexqPx medicalNoticexqPx) {
		getMedicalNoticexqPxs().remove(medicalNoticexqPx);
		medicalNoticexqPx.setMedicalNoticePx(null);

		return medicalNoticexqPx;
	}

//	public List<TjsfjlbTbPx> getTjsfjlbTbPxs() {
//		return this.tjsfjlbTbPxs;
//	}
//
//	public void setTjsfjlbTbPxs(List<TjsfjlbTbPx> tjsfjlbTbPxs) {
//		this.tjsfjlbTbPxs = tjsfjlbTbPxs;
//	}
//
//	public TjsfjlbTbPx addTjsfjlbTbPx(TjsfjlbTbPx tjsfjlbTbPx) {
//		getTjsfjlbTbPxs().add(tjsfjlbTbPx);
//		tjsfjlbTbPx.setMedicalNoticePx(this);
//
//		return tjsfjlbTbPx;
//	}
//
//	public TjsfjlbTbPx removeTjsfjlbTbPx(TjsfjlbTbPx tjsfjlbTbPx) {
//		getTjsfjlbTbPxs().remove(tjsfjlbTbPx);
//		tjsfjlbTbPx.setMedicalNoticePx(null);
//
//		return tjsfjlbTbPx;
//	}

}